<script setup>
const props = defineProps({
  item: Object
})

const emit = defineEmits(['delItem'])

const delItem = () => {
  emit('delItem', props.item.id)
}

</script>

<template>
  <div @click="delItem" class="item">{{item.name}}</div>
</template>

<style>
.item {
  padding: 10px;
  border: 1px solid gold;
}
</style>